<?php
include('config.php');
session_start();
date_default_timezone_set('Asia/Shanghai');
?>

<!DOCTYPE HTML>
<html>
<head>
<title>header</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="Resource/css/style.css" type="text/css" media="all" />
<link rel="stylesheet" href="Resource/css/flexslider.css" type="text/css" media="all" />
<link rel="stylesheet" href="Resource/css/tsc_tabs.css" type="text/css" media="all" />
<script src="admin/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src='Resource/js/jquery.color-RGBa-patch.js'></script>
<script src='Resource/js/example.js'></script>
<link rel="stylesheet" href="admin/bootstrap/css/bootstrap.css">
<script src="admin/bootstrap/js/bootstrap.min.js"></script>



</head>
<body>
<div class="header">
	<div class="header-top">
		<div class="wrap">
			<div class="h-logo">
			<a href="index.php"><img src="Resource/images/logo.png" alt=""/></a>
		</div>
			  <div class="nav-wrap">
					<ul class="group" id="example-one">
			           <li><a href="index.php">主页</a></li>
			  		   <li><a href="movies_events.php">电影</a></li>
			  		   <li>
                           <?php
                           if(isset($_SESSION['user'])){
                               $us=mysqli_query($con,"select * from tbl_registration where user_id='".$_SESSION['user']."'");
                               $user=mysqli_fetch_array($us);
                            ?>

                               <a href="profile.php">
                              欢迎! &nbsp; <?php echo $user['name'];?>
                               </a>

                               <a href="logout.php">注销</a>
                           <?php
                           }
                           else{
                               ?>
                               <a href="login.php">登录</a>
                           <?php
                           }
                           ?>
                       </li>
			        </ul>
			  </div>
 			<div class="clear"></div>
   		</div>
    </div>
     			<div class="clear"></div>
   	
<div class="block">
	<div class="wrap">
		
        <form action="process_search.php" id="reservation-form" method="post" onsubmit="myFunction()">
		       <fieldset>
		       	<div class="field" >
                                <input type="text" placeholder="搜索更多电影......" style="height:27px;width:500px"  required id="search111" name="search">
                                
                                <input type="submit" value="搜索" style="height:28px;padding-top:4px" id="button111">
    </div>       	

		       </fieldset>
            </form>
            <div class="clear"></div>
   </div>
</div>




<script>
function myFunction() {
     if($('#hero-demo').val()=="")
        {
            alert("请输入电影名称...");
            return false;
        }
    else{
        return true;
    }
    </script>
}